<HTML><HEAD>
<TITLE>netwib doc_html (version 5.39.0)</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H2><A HREF="../../index.html">main index</A></H2>
<H2><A HREF="../pkt.html">section index</A></H2><HR><BR>
<PRE>

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#880000"><B>/***************************************************************
 * Following functions create/decode packets. Their names      *
 * should be self explaining. They are specialized in decoding *
 * one kind of packet. To support several kind of packets, use *
 * <FONT COLOR="#000088">netwib_pkt_decode_layer_abc</FONT> instead.                        *
 ***************************************************************/</B></FONT>

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_linkdata</B>(<FONT COLOR="#000088">netwib_constlinkhdr</FONT> *plinkhdr,
                                      <FONT COLOR="#000088">netwib_constbuf</FONT> *pdata,
                                      <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_linkdata</B>(<FONT COLOR="#000088">netwib_device_dlttype</FONT> dlttype,
                                      <FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                      <FONT COLOR="#000088">netwib_linkhdr</FONT> *plinkhdr,
                                      <FONT COLOR="#000088">netwib_bufext</FONT> *pdata);

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_ipdata</B>(<FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                    <FONT COLOR="#000088">netwib_constbuf</FONT> *pdata,
                                    <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_ipdata</B>(<FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                    <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                    <FONT COLOR="#000088">netwib_bufext</FONT> *pdata);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_linkipdata</B>(<FONT COLOR="#000088">netwib_constlinkhdr</FONT> *plinkhdr,
                                        <FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                        <FONT COLOR="#000088">netwib_constbuf</FONT> *pdata,
                                        <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_linkipdata</B>(<FONT COLOR="#000088">netwib_device_dlttype</FONT> dlttype,
                                        <FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                        <FONT COLOR="#000088">netwib_linkhdr</FONT> *plinkhdr,
                                        <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                        <FONT COLOR="#000088">netwib_bufext</FONT> *pdata);

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_ipudpdata</B>(<FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                       <FONT COLOR="#000088">netwib_constudphdr</FONT> *pudphdr,
                                       <FONT COLOR="#000088">netwib_constbuf</FONT> *pdata,
                                       <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_ipudpdata</B>(<FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                       <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                       <FONT COLOR="#000088">netwib_udphdr</FONT> *pudphdr,
                                       <FONT COLOR="#000088">netwib_bufext</FONT> *pdata);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_linkipudpdata</B>(<FONT COLOR="#000088">netwib_constlinkhdr</FONT> *plinkhdr,
                                           <FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                           <FONT COLOR="#000088">netwib_constudphdr</FONT> *pudphdr,
                                           <FONT COLOR="#000088">netwib_constbuf</FONT> *pdata,
                                           <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_linkipudpdata</B>(<FONT COLOR="#000088">netwib_device_dlttype</FONT> dlttype,
                                           <FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                           <FONT COLOR="#000088">netwib_linkhdr</FONT> *plinkhdr,
                                           <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                           <FONT COLOR="#000088">netwib_udphdr</FONT> *pudphdr,
                                           <FONT COLOR="#000088">netwib_bufext</FONT> *pdata);

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_iptcpdata</B>(<FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                       <FONT COLOR="#000088">netwib_consttcphdr</FONT> *ptcphdr,
                                       <FONT COLOR="#000088">netwib_constbuf</FONT> *pdata,
                                       <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_iptcpdata</B>(<FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                       <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                       <FONT COLOR="#000088">netwib_tcphdr</FONT> *ptcphdr,
                                       <FONT COLOR="#000088">netwib_bufext</FONT> *pdata);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_linkiptcpdata</B>(<FONT COLOR="#000088">netwib_constlinkhdr</FONT> *plinkhdr,
                                           <FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                           <FONT COLOR="#000088">netwib_consttcphdr</FONT> *ptcphdr,
                                           <FONT COLOR="#000088">netwib_constbuf</FONT> *pdata,
                                           <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_linkiptcpdata</B>(<FONT COLOR="#000088">netwib_device_dlttype</FONT> dlttype,
                                           <FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                           <FONT COLOR="#000088">netwib_linkhdr</FONT> *plinkhdr,
                                           <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                           <FONT COLOR="#000088">netwib_tcphdr</FONT> *ptcphdr,
                                           <FONT COLOR="#000088">netwib_bufext</FONT> *pdata);

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_ipicmp4</B>(<FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                     <FONT COLOR="#000088">netwib_consticmp4</FONT> *picmp4,
                                     <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_ipicmp4</B>(<FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                     <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                     <FONT COLOR="#000088">netwib_icmp4</FONT> *picmp4);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_linkipicmp4</B>(<FONT COLOR="#000088">netwib_constlinkhdr</FONT> *plinkhdr,
                                         <FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                         <FONT COLOR="#000088">netwib_consticmp4</FONT> *picmp4,
                                         <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_linkipicmp4</B>(<FONT COLOR="#000088">netwib_device_dlttype</FONT> dlttype,
                                         <FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                         <FONT COLOR="#000088">netwib_linkhdr</FONT> *plinkhdr,
                                         <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                         <FONT COLOR="#000088">netwib_icmp4</FONT> *picmp4);

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_ipicmp6</B>(<FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                     <FONT COLOR="#000088">netwib_consticmp6</FONT> *picmp6,
                                     <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_ipicmp6</B>(<FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                     <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                     <FONT COLOR="#000088">netwib_icmp6</FONT> *picmp6);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_linkipicmp6</B>(<FONT COLOR="#000088">netwib_constlinkhdr</FONT> *plinkhdr,
                                         <FONT COLOR="#000088">netwib_constiphdr</FONT> *piphdr,
                                         <FONT COLOR="#000088">netwib_consticmp6</FONT> *picmp6,
                                         <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_linkipicmp6</B>(<FONT COLOR="#000088">netwib_device_dlttype</FONT> dlttype,
                                         <FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                         <FONT COLOR="#000088">netwib_linkhdr</FONT> *plinkhdr,
                                         <FONT COLOR="#000088">netwib_iphdr</FONT> *piphdr,
                                         <FONT COLOR="#000088">netwib_icmp6</FONT> *picmp6);

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#880000">/* before calling this function, user has to set plinkhdr-&gt;type
   to ARP or RARP */</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_append_linkarp</B>(<FONT COLOR="#000088">netwib_constlinkhdr</FONT> *plinkhdr,
                                     <FONT COLOR="#000088">netwib_constarphdr</FONT> *parphdr,
                                     <FONT COLOR="#000088">netwib_buf</FONT> *ppkt);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_pkt_decode_linkarp</B>(<FONT COLOR="#000088">netwib_device_dlttype</FONT> dlttype,
                                     <FONT COLOR="#000088">netwib_constbuf</FONT> *ppkt,
                                     <FONT COLOR="#000088">netwib_linkhdr</FONT> *plinkhdr,
                                     <FONT COLOR="#000088">netwib_arphdr</FONT> *parphdr);
</PRE><BR><BR><HR><BR>
<H2><A HREF="../../index.html">main index</A></H2>
<H2><A HREF="../pkt.html">section index</A></H2>
</BODY></HTML>
